package com.example.taximeter.mapper;

import com.example.taximeter.bean.CarInfo;
import com.example.taximeter.bean.Fact;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 出租车
 */
@Mapper
public interface CarInfoMapper {

    //查询出租车列表
    @SelectProvider(type = ActivityMapperProvider.class, method = "findCarInfoAll")
    @Results({
            @Result(property = "id", column = "id"),
            @Result(property = "companyname", column = "company_name"),
            @Result(property = "carno", column = "car_no"),
            @Result(property = "companyid", column = "company_id"),
            @Result(property = "intime", column = "in_time")
    })
    List<CarInfo> findCarInfo(CarInfo carInfo);

    //查询出租车公司列表
    @Select("select id , car_no from tab_in_car_info")
    @Results({
            @Result(property = "id", column = "id"),
            @Result(property = "carno", column = "car_no"),
    })
    List<CarInfo> findCarList();
}
